$color:rgba(6,21,55, 0.7);
@mixin dis-flex-center{
    display: flex;
    justify-content: center;
    align-items: center;
}

//边框四角装饰方块,需要父元素指定'position'
$conbot-size:.625rem;
.conbot-1{
    position: absolute;
    left: 0;
    top: 0;
    width: $conbot-size;
}
.conbot-2{
    position: absolute;
    right: 0;
    top: 0;
    width: $conbot-size;
}
.conbot-3{
    position: absolute;
    left: 0;
    bottom: 0;
    width: $conbot-size;
}
.conbot-4{
    position: absolute;
    right: 0;
    bottom: 0;
    width: $conbot-size;
}

.i-img-1{
    position: absolute;
    top: 0;
    left: 0;
}
.i-img-2{
    position: absolute;
    top: 0;
    right: 0;
}
.i-img-3{
    position: absolute;
    bottom: 0;
    left: 0;
}
.i-img-4{
    position: absolute;
    bottom: 0;
    right: 0;
}

//主布局样式：导航栏+内容
$navi-height: 4.375rem;
$fir-height: .625rem;
$title-font-size: 1.875rem;
.my-page{
    width: 100%;
    height: 100%;
    >nav{
        width: 100%;
        height: $navi-height;
        >.fir{
            height: $fir-height;
            background:$color;
        }
        >.page-title-main{
            @extend .page-title-main-proto;
            height: calc(100% - #{$fir-height});
        }
    }
    >div{
        width: 100%;
        height: calc(100% - #{$navi-height});      
    }
}


//主标题样式
.page-title-main-proto{
    position: relative;
    @include dis-flex-center;
}
.title-main{
    position: relative;
    @include dis-flex-center;
    height: 100%;
    font-size: $title-font-size;
    font-weight: 300;
    background:$color;
}
.nav-link{              
    color: white;
    &::after {
        position: absolute;
        content: "";
        top: 85%;
        left: 0;
        width: 100%;
        height: .09375rem;
        background: white;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.5s;
    }
    &:hover {
        color: white;
        cursor: pointer;
    }
    &:hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }
}


//主井、副井主页面导航按钮
.route-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .3125rem 1.25rem .3125rem 1.25rem;
    border:1px solid #345f92;
    font-size: 1.25rem;
    font-weight: 100;
    background:rgba(16,54,87,0.5);
}
.route-btn-left{  
    position: absolute;
    top:0;
    left: 0;
    @extend .route-btn;
}
.route-btn-right{
    position: absolute;
    top:0;
    right: 0;
    @extend .route-btn;
}
//按钮超链接样式
.r-link{
    color: white;
}


//导航栏中的三角形
$tri-width:5rem;
@mixin tri{
    width: 0;
    height: 0;
    border-top: calc(#{$navi-height} - #{$fir-height}) solid $color;
}
.left-tri{
    @include tri;
    border-left: #{$tri-width} solid transparent;
}
.right-tri{
    @include tri;
    border-right: #{$tri-width} solid transparent;
}




// .my-page-2{
//     //需要用到的变量
//     --navi-height:4.375rem;
//     --title-height:3.75rem;
//     --img-width:18.75rem;
//     --title-font-size:1.875rem;

//     width: 100%;
//     height: 100%;
//     >nav{
//         position: relative;
//         display: flex;
//         justify-content: center;
//         align-items: center;
//         width: 100%;
//         height: var(--navi-height);
//         >img{
//             width: var(--img-width);
//         }
//         >div{
//             position: relative;
//             padding: 0 1.875rem;
//             height: var(--title-height);
//             text-align: center;
//             line-height: var(--title-height);
//             >.nav-link{
//                 font-size: var(--title-font-size);
//                 font-weight: 300;
//                 color: white;
//                 &::after {
//                     position: absolute;
//                     content: "";
//                     top: 3.125rem;
//                     left: 0;
//                     width: 100%;
//                     height: .09375rem;
//                     background: white;
//                     transform: scaleX(0);
//                     transform-origin: right;
//                     transition: transform 0.5s;
//                 }
//                 &:hover {
//                     color: white;
//                     cursor: pointer;
//                 }
//                 &:hover::after {
//                     transform: scaleX(1);
//                     transform-origin: left;
//                 }
//             }
//         }
//     }
//     >div{
//         position: relative;
//         width: 100%;
//         height: calc(100% - var(--navi-height));      
//     }
// }


//模块样式：标题+内容
$module-color:rgba(16,54,87,0.5);
$module-nav-height:2.1875rem;
.my-module{
    background:$module-color;
    border:1px solid #345f92;
    >nav{
        position:relative;
        height: $module-nav-height;
        >.curve-link{
            margin-left: 5px;
            line-height:$module-nav-height;
            font-size: 1.125rem;
            font-weight: 300;
            color:#fff;
        }
    }
    >div{
        position: relative;
        margin: 0 auto;
        width: 100%;
        height: calc(100% - #{$module-nav-height});
    }
}


//模块标题中的图片样式
.module-nav-img{
    position:absolute;
    left:0;
    bottom:0;
    width:100%;
}

.my-module-2{
    --nav-height:1.875rem;
    --nav-font-size:1.125rem;
    background-color: rgba(0,58,140,0.85);
    border: 1px solid #40a9ff;
    // border: 5px solid transparent;
    // border-image: linear-gradient(to top, #F80, #2ED);
    // border-image-slice: 5;
    >nav{
        width: 100%;
        height:var(--nav-height);
        box-sizing: border-box;
        border-bottom: 1px solid white;
        line-height: var(--nav-height);
        text-align: center;
        font-size: var(--nav-font-size);
        font-weight: 300;
        color: white;
    }
    >div{
        position: relative;
        margin: 0 auto;
        width: 100%;
        height: calc(100% - var(--nav-height));
    }
}

.my-module-3{
    --nav-height:2.5rem;
    // background:rgba(16,54,87,0.5);
    border:1px solid #345f92;
    //background-color: coral;
    >nav{
        position:relative;
        //margin:.3125rem 0;
        height: var(--nav-height);
        //background-color: cornflowerblue;
        >.curve-link{
            line-height:var(--nav-height);
            font-size: 1.125rem;
            font-weight: 300;
            margin-left: 5px;
            color:#fff;
        }
        >img{
            position:absolute;
            left:0;
            bottom:0;
            width:100%;
        }
    }
    >div{
        position: relative;
        margin: 0 auto;
        width: 100%;
        height: calc(100% - var(--nav-height));
    }
}